package com.letoken.platform.repo.ecommerce.po;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author author
 * @since 2023-09-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ecommerce_user_order")
@ApiModel(value="EcommerceUserOrder对象", description="订单")
public class EcommerceUserOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "订单编号")
    private String orderNo;


    @ApiModelProperty(value = "店铺订单编号")
    private String fatherNo;

    @ApiModelProperty(value = "商品ID")
    private Integer productId;

    @ApiModelProperty(value = "商品标题")
    private String productTitle;

    @ApiModelProperty(value = "购买数量")
    private Integer quantity;

    @ApiModelProperty(value = "商品销售属性")
    private String productAttr;

    @ApiModelProperty(value = "提交时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "订单总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "实际单价")
    private BigDecimal realPrice;

    @ApiModelProperty(value = "运费金额")
    private BigDecimal shipping;


    @ApiModelProperty(value = "订单总金额")
    @TableField("total_amount_cap")
    private BigDecimal totalAmountCap;

    @ApiModelProperty(value = "实际单价")
    @TableField("real_price_cap")
    private BigDecimal realPriceCap;

    @ApiModelProperty(value = "运费金额")
    @TableField("shipping_cap")
    private BigDecimal shippingCap;


    @ApiModelProperty(value = "订单状态：0->待付款；1->待发货； 2->待收货；3->已完成 4->已取消")
    private Integer status;

    @ApiModelProperty(value = "确认收货状态 0未确认 1已确认")
    private Integer confirmStatus;

    @ApiModelProperty(value = "删除状态 0未删除 1已删除")
    private Integer deleteStatus;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;


    @ApiModelProperty(value = "单价")
    private BigDecimal price;

    @ApiModelProperty(value = "sku库存id")
    private Integer skuId;

    @ApiModelProperty(value = "店铺ID")
    private Integer mallId;


    @ApiModelProperty(value = "让利值")
    private BigDecimal contributing;

    // 支付金额
    private BigDecimal  payAmount;

    @ApiModelProperty(value = "运费金额")
    @TableField("pay_amount_cap")
    private BigDecimal payAmountCap;

    private BigDecimal rmbRate;

    private BigDecimal  refundAmount;

    // 0 未评价 1已评价
    private Integer reviewed;

}
